package org.elepower.pojo;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
import java.util.Objects;

public class PsFunction implements Serializable {
    private Integer id;
    private String functionCode;
    private String functionName;
    private Date creationTime;
    private String createdBy;
    private Date lastUpdateTime;
    private String funUrl;
    private Integer parentId;
    private Integer isStart;
    private List<PsFunction> children;
    private boolean open = true;

    public boolean isOpen() {
        return open;
    }

    public void setOpen(boolean open) {
        this.open = open;
    }

    public List<PsFunction> getChildren() {
        return children;
    }

    public void setChildren(List<PsFunction> children) {
        this.children = children;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFunctionCode() {
        return functionCode;
    }

    public void setFunctionCode(String functionCode) {
        this.functionCode = functionCode;
    }

    public String getFunctionName() {
        return functionName;
    }

    public void setFunctionName(String functionName) {
        this.functionName = functionName;
    }

    public Date getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(Date creationTime) {
        this.creationTime = creationTime;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public String getFunUrl() {
        return funUrl;
    }

    public void setFunUrl(String funUrl) {
        this.funUrl = funUrl;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getIsStart() {
        return isStart;
    }

    public void setIsStart(Integer isStart) {
        this.isStart = isStart;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PsFunction that = (PsFunction) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(functionCode, that.functionCode) &&
                Objects.equals(functionName, that.functionName) &&
                Objects.equals(creationTime, that.creationTime) &&
                Objects.equals(createdBy, that.createdBy) &&
                Objects.equals(lastUpdateTime, that.lastUpdateTime) &&
                Objects.equals(funUrl, that.funUrl) &&
                Objects.equals(parentId, that.parentId) &&
                Objects.equals(isStart, that.isStart);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, functionCode, functionName, creationTime, createdBy, lastUpdateTime, funUrl, parentId, isStart);
    }
}
